#include<stdio.h>

int main(void)
{
	float xiaoshou;
	double income;
	
	scanf("%f",&xiaoshou);
	
	if(xiaoshou<=10000)
	{
		xiaoshou*=0.05;
	}
	else if(xiaoshou>10000&&xiaoshou<=50000)
	{
		xiaoshou=(xiaoshou-10000)*0.03+500;
	}
	else
	{
		xiaoshou=(xiaoshou-50000)*0.02+1700;
	}
	
	printf("%.2f",xiaoshou+1500);
	
	return 0;
}
